<template>
  <div class="app-container">
      <FilterForm :data="filterData" @search="getList" labelWidth="86px" />

      <el-row :gutter="10" class="mb8">
            <el-col :span="1.5">
                <Export
                    :api="$Api.sales.delivery.exportGoods"
                    />
            </el-col>
      </el-row>

      <Table
        :api="$Api.sales.delivery.goodDetail"
        :selection="true"
        @select="handleSelectionChange"
        ref="Table"
        height="60vh"
        >
      <el-table-column label="仓库" align="center" prop="warehouse" />
      <el-table-column label="包号" align="center" prop="baleNum" />
      <el-table-column label="品名" align="center" prop="goodsName" />
      <el-table-column label="品牌" align="center" prop="brandName" />
      <el-table-column label="等级" align="center" prop="level" />
      <el-table-column label="厚度" align="center" prop="ply" />
      <el-table-column label="宽度" align="center" prop="width" />
      <el-table-column label="长度" align="center" prop="length" />
      <el-table-column label="片数" align="center" prop="sliceCount" />
      <el-table-column label="件数" align="center" prop="pieceCount" />
      <el-table-column label="方数" align="center" prop="count" />
      <el-table-column label="最低售价" align="center" prop="minPrice" />
      <el-table-column label="未税单价" align="center" prop="noTaxPrice" />
      <el-table-column label="含税单价" align="center" prop="includedTaxPrice" />
      <el-table-column label="金额" align="center" prop="money" />
      <el-table-column label="成本单价" align="center" prop="costPrice" />
      <el-table-column label="成本价" align="center" prop="costMoney" />
      <el-table-column label="提单号" align="center" prop="ladingNum" />
      <el-table-column label="合同号" align="center" prop="pactNum" />
      <el-table-column label="开证公司" align="center" prop="pactName" />
      <el-table-column label="货物状态" align="center" prop="goodsStatus" />
      <el-table-column label="单据编号" align="center" prop="deliveryId" />
      <el-table-column label="制单人" align="center" prop="createBy" />
      <el-table-column label="单据日期" align="center" prop="subBillTime" width="180" />
      <el-table-column label="入库日期" align="center" prop="inWarehouseTime" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.inWarehouseTime, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="备注" align="center" prop="remark" />
      </Table>

  </div>
</template>

<script>

export default {
  name: "SalesDeliveryGoods",
  data() {
    return {
      filterData: [
                {
                    label: "单据日期",
                    type: "period_date",
                    st: "beginRegisterTime",
                    end: "endRegisterTime",
                    scale: 2,
                },
                {
                    label: "客户",
                    name: "pactName",
                    type: "customer",
                },
                { label: "包号", name: "baleNum" },
                {
                    label: "品名",
                    name: "goodsName",
                    type: "select",
                    select: "goodsName",
                },
                {
                    label: "品牌",
                    name: "productName",
                    type: "select",
                    select: "productName",
                },
                {
                    label: "等级",
                    name: "levelName",
                    type: "select",
                    select: "levelName",
                },
                {
                    label: "仓库",
                    name: "warehouse",
                    type: "select",
                    select: "warehouse",
                },
                {
                    label: "销售员",
                    name: "pactName",
                    type: "sales",
                },
                { label: "提单号", name: "ladingNum" },
                { label: "合同号", name: "pactNum" },
                { label: "单据编号", name: "deliveryId" },
                {
                    label: "开证公司",
                    name: "pactName",
                    type: "supplier",
                },
                { label: "厚度", name: "ply" },
                { label: "宽度", name: "width" },
                { label: "长度", name: "length" },
                { label: "片数", name: "sliceCount" },
               
                
            ],
    };
  },
  created() {
    
  },
  methods: {
    /** 查询销售出库商品明细列表 */
    getList(params) {
            this.$refs.Table.getData(params);
        },

    /** 导出按钮操作 */
    handleSelectionChange() {},
  }
};
</script>
